import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class Generate {

	/**
	 * Generator of numbers
	 * 
	 */
	public static void main(String[] args) {

		Random random = new Random();

		for (int i = 0; i < 15; i++) {

			int pick = 1000000 +random.nextInt(9000000);
			System.out.println(pick);
			
		}

		generateCsvFile("c:\\test.csv");

		System.out.println("Done ... ");
	}

	private static void generateCsvFile(String fileName) {

		try {
			FileWriter writer = new FileWriter(fileName);
			writer.append("Generated value");
			writer.append(',');
			writer.append("ID");
			writer.append(',');
			writer.append("TABLE");
			writer.append('\n');

			for (int i = 0; i < 15; i++) {

				writer.append(data.getRandomValues());
				writer.append(',');
				writer.append(data.getStringId());
				writer.append(',');
				writer.append(data.getStringTable());
				writer.append('\n');

			}
			writer.flush();
			writer.close();
		}

		catch (IOException e) {
			e.printStackTrace();
		}

	}

}
